package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Region;
import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.StrategyQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface IStrategyService {

    PageInfo query(QueryObject qo);

    void saveOrUpdate(Strategy strategy);

    List<Strategy> listAll();

    List<String> searchTitle();

    Strategy selectStrategyByTitle(String title);

    Strategy selectByStrategyId(Long id);
    //大家都来看中间表
    void insertRelation(Long strategyId,Long travelId);

    void deleteRelation(Long strategyId, Long travelId);
    //app显示
    Strategy getTravelById(Long id);

    int getLikeCount(Long strategyId);

    int queryIfexist(Long strategyId, Long userId);

    void saveLike(Long userId, Long strategyId);

    void deleteLike(Long userId, Long strategyId);
}
